package com.example.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableComment;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@Accessors(chain = true)
@TableName(value = "test_user2")//指定表名
@Table(isSimple = true, comment = "用户表2")
public class User2 implements Serializable {
    private static final long serialVersionUID = -5644799954031156649L;

    @Column(isKey = true,isAutoIncrement = true,length = 10)//指定自增策略
    private Integer id;

    private String name;

    private String sex;

    private String passWord;

    @Column(length = 32)
    private String email;//字段被修改时，会自动修改表结构
}
